The "Core Data", supplied as a text file, is available for large business packages ONLY.   Please call for the price of these licenses 01945 464854

Please see  http://www.simplypostcode.com/royal-mail-paf-data.htm for more inforation

=======================================================================
This ia an example of how to clean the postcode field after user entry

PO10 1JJ becomes PO101JJ
PO11DA becomes PO1 1DA

   Function FormatPostCode(ByVal Postcode$) As String

      If Postcode = "" Then
         FormatPostCode = Postcode
         Exit Function
      End If

      'Correct common mistakes
      Postcode = Postcode.Replace("  ", " ") 'Remove two spaces

      Postcode = Postcode.Replace("!", "1")  'Correct common typing mistakes
      Postcode = Postcode.Replace("""", "2")
      Postcode = Postcode.Replace("", "3")
      Postcode = Postcode.Replace("$", "4")
      Postcode = Postcode.Replace("%", "5")
      Postcode = Postcode.Replace("^", "6")
      Postcode = Postcode.Replace("&", "7")
      Postcode = Postcode.Replace("*", "8")
      Postcode = Postcode.Replace("(", "9")
      Postcode = Postcode.Replace(")", "0")

      'Make 7 chars long
      If Len(Postcode) = 7 Then
         'Is correct
         FormatPostCode = Postcode
      Else
         'format
         'So get last three digits
         Dim LastThreeChars$ = Microsoft.VisualBasic.Right$(Postcode, 3)

         If Len(Postcode) = 8 Then
            FormatPostCode = Microsoft.VisualBasic.Left$(Postcode, 4) & LastThreeChars
         Else
            If Len(Postcode) = 6 Then
               FormatPostCode = Microsoft.VisualBasic.Left$(Postcode, 3) & " " & LastThreeChars
            Else
               If Len(Postcode) = 5 Then
                  FormatPostCode = Microsoft.VisualBasic.Left$(Postcode, 2) & "  " & LastThreeChars
               Else
                  FormatPostCode = Left$(Postcode & "      ", 7)
               End If
            End If
         End If
      End If
   End Function

